package cn.kgc.controller;

import cn.kgc.pojo.Year2_zzw;
import cn.kgc.service.YearService2_zzw;
import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author:
 * @date: 2022/2/23
 * @description:
 */
@Controller
public class Controller2_zzw {
    @Resource
    private YearService2_zzw y;

    @RequestMapping("公司各体系结构分析")
    public String go() {
        return "公司各体系结构分析理";
    }
    @RequestMapping("sell")
    @ResponseBody
    public String sell(){
        List<Year2_zzw> sell = y.sell();
        return JSON.toJSONStringWithDateFormat(sell,"yyyy");
    }
}
